/*
 * @Description: 
 * @Version: 2.0
 * @Autor: ftt
 * @Date: 2022-06-09 11:20:34
 * @LastEditors: TT
 * @LastEditTime: 2023-03-10 23:13:26
 */
import 'package:flutter/material.dart';
import 'package:hzy_normal_widget/hzy_normal_widget.dart';
import '../config/hzy_color_config.dart';
import 'common_place_holder_widget.dart';

abstract class CommonStateListWidget<T extends StatefulWidget>
    extends NormalListState<T> {
  /// 属性
  ///
  ///
  CommonPlaceHoldType placeHoldType = CommonPlaceHoldType.nothing;

  /// 创建失败 界面
  // 创建 列表 缺省页
  @override
  Widget? createEmptyWidget() {
    return pageState == PageState.emptyDataState ? createErrorWidget() : null;
  }

  /// 创建整个界面失败页,具体怎么显示,取决于你的业务场景
  /// 创建失败 界面
  @override
  Widget? createErrorWidget() {
    return CommonPlaceHoldPage(
      placeHoldType: placeHoldType,
      ontap: (value) {
        // getnetworkdata(3, configNetWorkParmas());
      },
    );
  }

  @override
  Color? createLeadingIconColor() {
    return HzyColorConfig().col000000;
  }

  @override
  Color? createAppBarTextColor() {
    return HzyColorConfig().col000000;
  }
}
